themedir     = $(datadir)/themes
adaptadir    = $(DESTDIR)$(themedir)/Adapta
noktodir     = $(DESTDIR)$(themedir)/Adapta-Nokto
adaptaetadir = $(DESTDIR)$(themedir)/Adapta-Eta
noktoetadir  = $(DESTDIR)$(themedir)/Adapta-Nokto-Eta

shelldir   = $(srcdir)/gnome-shell
shell_file = \
	$(shelldir)/gnome-shell.css \
	$(shelldir)/gnome-shell-theme.gresource \
	$(shelldir)/key-enter.svg \
	$(shelldir)/key-enter-active.svg \
	$(shelldir)/key-hide.svg \
	$(shelldir)/key-layout.svg \
	$(shelldir)/key-shift.svg \
	$(shelldir)/key-shift-latched-uppercase.svg \
	$(shelldir)/key-shift-uppercase.svg \
	$(shelldir)/message-indicator-symbolic.svg \
	$(shelldir)/no-events.svg \
	$(shelldir)/no-notifications.svg \
	$(shelldir)/noise-texture.png \
	$(shelldir)/process-working.svg \
	$(shelldir)/toggle-off.svg \
	$(shelldir)/toggle-on.svg
if ENABLE_GNOME
if GNOME_IS_326_OR_NEWER
shell_gdm3_file = $(shelldir)/gdm3-Adapta.css
endif
endif
shell_pad_osd_file = \
	$(shelldir)/pad-osd.css
shell_asset_file = \
	$(shelldir)/assets/calendar-arrow-left-hover.svg \
	$(shelldir)/assets/calendar-arrow-left.svg \
	$(shelldir)/assets/calendar-arrow-right-hover.svg \
	$(shelldir)/assets/calendar-arrow-right.svg \
	$(shelldir)/assets/checkbox-hover.svg \
	$(shelldir)/assets/checkbox-off-hover.svg \
	$(shelldir)/assets/checkbox-off.svg \
	$(shelldir)/assets/checkbox.svg \
	$(shelldir)/assets/corner-ripple-ltr.svg \
	$(shelldir)/assets/corner-ripple-rtl.svg \
	$(shelldir)/assets/dash-placeholder.svg \
	$(shelldir)/assets/go-down.svg \
	$(shelldir)/assets/go-up.svg \
	$(shelldir)/assets/media-control-active.svg \
	$(shelldir)/assets/media-control-hover.svg \
	$(shelldir)/assets/more-results.svg \
	$(shelldir)/assets/window-close-active.svg \
	$(shelldir)/assets/window-close-hover.svg \
	$(shelldir)/assets/window-close.svg
shell_extension_windowlist_file = \
	$(shelldir)/extensions/window-list/classic.css \
	$(shelldir)/extensions/window-list/stylesheet.css \
	$(shelldir)/extensions/window-list/README
shell_extension_workspace_file = \
	$(shelldir)/extensions/workspaces-to-dock/workspaces-to-dock.css
shell_extension_workspace_asset_file = \
	$(shelldir)/extensions/workspaces-to-dock/assets/four-bottom.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/four-left.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/four-right.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/four-top.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/h-four.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/h-one.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/h-three.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/h-two.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/one-bottom.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/one-left.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/one-right.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/one-top.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/three-bottom.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/three-left.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/three-right.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/three-top.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/two-bottom.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/two-left.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/two-right.svg \
	$(shelldir)/extensions/workspaces-to-dock/assets/two-top.svg

shellnoktodir    = $(srcdir)/gnome-shell-nokto
shell_nokto_file = \
	$(shellnoktodir)/gnome-shell.css \
	$(shellnoktodir)/gnome-shell-theme.gresource \
	$(shellnoktodir)/key-enter.svg \
	$(shellnoktodir)/key-enter-active.svg \
	$(shellnoktodir)/key-hide.svg \
	$(shellnoktodir)/key-layout.svg \
	$(shellnoktodir)/key-shift.svg \
	$(shellnoktodir)/key-shift-latched-uppercase.svg \
	$(shellnoktodir)/key-shift-uppercase.svg \
	$(shellnoktodir)/message-indicator-symbolic.svg \
	$(shellnoktodir)/no-events.svg \
	$(shellnoktodir)/no-notifications.svg \
	$(shellnoktodir)/noise-texture.png \
	$(shellnoktodir)/process-working.svg \
	$(shellnoktodir)/toggle-off.svg \
	$(shellnoktodir)/toggle-on.svg
if ENABLE_GNOME
if GNOME_IS_326_OR_NEWER
shell_nokto_gdm3_file = $(shellnoktodir)/gdm3-Adapta-Nokto.css
endif
endif
shell_nokto_asset_file = \
	$(shellnoktodir)/assets/calendar-arrow-left-hover.svg \
	$(shellnoktodir)/assets/calendar-arrow-left.svg \
	$(shellnoktodir)/assets/calendar-arrow-right-hover.svg \
	$(shellnoktodir)/assets/calendar-arrow-right.svg \
	$(shellnoktodir)/assets/checkbox-hover.svg \
	$(shellnoktodir)/assets/checkbox-off-hover.svg \
	$(shellnoktodir)/assets/checkbox-off.svg \
	$(shellnoktodir)/assets/checkbox.svg \
	$(shellnoktodir)/assets/corner-ripple-ltr.svg \
	$(shellnoktodir)/assets/corner-ripple-rtl.svg \
	$(shellnoktodir)/assets/dash-placeholder.svg \
	$(shellnoktodir)/assets/go-down.svg \
	$(shellnoktodir)/assets/go-up.svg \
	$(shellnoktodir)/assets/media-control-active.svg \
	$(shellnoktodir)/assets/media-control-hover.svg \
	$(shellnoktodir)/assets/more-results.svg \
	$(shellnoktodir)/assets/window-close-active.svg \
	$(shellnoktodir)/assets/window-close-hover.svg \
	$(shellnoktodir)/assets/window-close.svg

shelletadir   = $(srcdir)/gnome-shell-eta
shelleta_file = \
	$(shelletadir)/gnome-shell.css \
	$(shelletadir)/gnome-shell-theme.gresource \
	$(shelletadir)/key-enter.svg \
	$(shelletadir)/key-enter-active.svg \
	$(shelletadir)/key-hide.svg \
	$(shelletadir)/key-layout.svg \
	$(shelletadir)/key-shift.svg \
	$(shelletadir)/key-shift-latched-uppercase.svg \
	$(shelletadir)/key-shift-uppercase.svg \
	$(shelletadir)/message-indicator-symbolic.svg \
	$(shelletadir)/no-events.svg \
	$(shelletadir)/no-notifications.svg \
	$(shelletadir)/noise-texture.png \
	$(shelletadir)/process-working.svg \
	$(shelletadir)/toggle-off.svg \
	$(shelletadir)/toggle-on.svg
if ENABLE_GNOME
if GNOME_IS_326_OR_NEWER
shell_eta_gdm3_file = $(shelletadir)/gdm3-Adapta-Eta.css
endif
endif
shelleta_asset_file = \
	$(shelletadir)/assets/calendar-arrow-left-hover.svg \
	$(shelletadir)/assets/calendar-arrow-left.svg \
	$(shelletadir)/assets/calendar-arrow-right-hover.svg \
	$(shelletadir)/assets/calendar-arrow-right.svg \
	$(shelletadir)/assets/checkbox-hover.svg \
	$(shelletadir)/assets/checkbox-off-hover.svg \
	$(shelletadir)/assets/checkbox-off.svg \
	$(shelletadir)/assets/checkbox.svg \
	$(shelletadir)/assets/corner-ripple-ltr.svg \
	$(shelletadir)/assets/corner-ripple-rtl.svg \
	$(shelletadir)/assets/dash-placeholder.svg \
	$(shelletadir)/assets/go-down.svg \
	$(shelletadir)/assets/go-up.svg \
	$(shelletadir)/assets/media-control-active.svg \
	$(shelletadir)/assets/media-control-hover.svg \
	$(shelletadir)/assets/more-results.svg \
	$(shelletadir)/assets/window-close-active.svg \
	$(shelletadir)/assets/window-close-hover.svg \
	$(shelletadir)/assets/window-close.svg

shellnoktoetadir     = $(srcdir)/gnome-shell-nokto-eta
shell_nokto_eta_file = \
	$(shellnoktoetadir)/gnome-shell.css \
	$(shellnoktoetadir)/gnome-shell-theme.gresource \
	$(shellnoktoetadir)/key-enter.svg \
	$(shellnoktoetadir)/key-enter-active.svg \
	$(shellnoktoetadir)/key-hide.svg \
	$(shellnoktoetadir)/key-layout.svg \
	$(shellnoktoetadir)/key-shift.svg \
	$(shellnoktoetadir)/key-shift-latched-uppercase.svg \
	$(shellnoktoetadir)/key-shift-uppercase.svg \
	$(shellnoktoetadir)/message-indicator-symbolic.svg \
	$(shellnoktoetadir)/no-events.svg \
	$(shellnoktoetadir)/no-notifications.svg \
	$(shellnoktoetadir)/noise-texture.png \
	$(shellnoktoetadir)/process-working.svg \
	$(shellnoktoetadir)/toggle-off.svg \
	$(shellnoktoetadir)/toggle-on.svg
if ENABLE_GNOME
if GNOME_IS_326_OR_NEWER
shell_nokto_eta_gdm3_file = $(shellnoktoetadir)/gdm3-Adapta-Nokto-Eta.css
endif
endif
shell_nokto_eta_asset_file = \
	$(shellnoktoetadir)/assets/calendar-arrow-left-hover.svg \
	$(shellnoktoetadir)/assets/calendar-arrow-left.svg \
	$(shellnoktoetadir)/assets/calendar-arrow-right-hover.svg \
	$(shellnoktoetadir)/assets/calendar-arrow-right.svg \
	$(shellnoktoetadir)/assets/checkbox-hover.svg \
	$(shellnoktoetadir)/assets/checkbox-off-hover.svg \
	$(shellnoktoetadir)/assets/checkbox-off.svg \
	$(shellnoktoetadir)/assets/checkbox.svg \
	$(shellnoktoetadir)/assets/corner-ripple-ltr.svg \
	$(shellnoktoetadir)/assets/corner-ripple-rtl.svg \
	$(shellnoktoetadir)/assets/dash-placeholder.svg \
	$(shellnoktoetadir)/assets/go-down.svg \
	$(shellnoktoetadir)/assets/go-up.svg \
	$(shellnoktoetadir)/assets/media-control-active.svg \
	$(shellnoktoetadir)/assets/media-control-hover.svg \
	$(shellnoktoetadir)/assets/more-results.svg \
	$(shellnoktoetadir)/assets/window-close-active.svg \
	$(shellnoktoetadir)/assets/window-close-hover.svg \
	$(shellnoktoetadir)/assets/window-close.svg

cinnamondir   = $(srcdir)/cinnamon
cinnamon_file = \
	$(cinnamondir)/cinnamon.css
cinnamon_asset_checkbox_file = \
	$(cinnamondir)/assets/checkbox/checkbox-checked.svg \
	$(cinnamondir)/assets/checkbox/checkbox-unchecked.svg \
	$(cinnamondir)/assets/checkbox/radiobutton-checked.svg \
	$(cinnamondir)/assets/checkbox/radiobutton-unchecked.svg
cinnamon_asset_menu_file = \
	$(cinnamondir)/assets/menu/menu-hover.svg \
	$(cinnamondir)/assets/menu/menu-separator.svg \
	$(cinnamondir)/assets/menu/menu.svg \
	$(cinnamondir)/assets/menu/submenu.svg
cinnamon_asset_misc_file = \
	$(cinnamondir)/assets/misc/add-workspace-active.svg \
	$(cinnamondir)/assets/misc/add-workspace-hover.svg \
	$(cinnamondir)/assets/misc/add-workspace.svg \
	$(cinnamondir)/assets/misc/bg.svg \
	$(cinnamondir)/assets/misc/button-box.svg \
	$(cinnamondir)/assets/misc/calendar-arrow-left.svg \
	$(cinnamondir)/assets/misc/calendar-arrow-right.svg \
	$(cinnamondir)/assets/misc/close-active.svg \
	$(cinnamondir)/assets/misc/close-hover.svg \
	$(cinnamondir)/assets/misc/close.svg \
	$(cinnamondir)/assets/misc/corner-ripple.svg \
	$(cinnamondir)/assets/misc/desklet-header.svg \
	$(cinnamondir)/assets/misc/desklet.svg \
	$(cinnamondir)/assets/misc/message.svg \
	$(cinnamondir)/assets/misc/osd.svg \
	$(cinnamondir)/assets/misc/overview-hover.svg \
	$(cinnamondir)/assets/misc/overview.svg \
	$(cinnamondir)/assets/misc/trash-icon.svg
cinnamon_asset_panel_file = \
	$(cinnamondir)/assets/panel/activities-active.svg \
	$(cinnamondir)/assets/panel/activities.svg
cinnamon_asset_switch_file = \
	$(cinnamondir)/assets/switch/switch-off.svg \
	$(cinnamondir)/assets/switch/switch-on.svg
cinnamon_asset_thumb_file = \
	$(cinnamondir)/assets/thumbnail.png

cinnamonnoktodir    = $(srcdir)/cinnamon-nokto
cinnamon_nokto_file = \
	$(cinnamonnoktodir)/cinnamon.css
cinnamon_nokto_asset_checkbox_file = \
	$(cinnamonnoktodir)/assets/checkbox/checkbox-checked.svg \
	$(cinnamonnoktodir)/assets/checkbox/checkbox-unchecked.svg \
	$(cinnamonnoktodir)/assets/checkbox/radiobutton-checked.svg \
	$(cinnamonnoktodir)/assets/checkbox/radiobutton-unchecked.svg
cinnamon_nokto_asset_menu_file = \
	$(cinnamonnoktodir)/assets/menu/menu-hover.svg \
	$(cinnamonnoktodir)/assets/menu/menu-separator.svg \
	$(cinnamonnoktodir)/assets/menu/menu.svg \
	$(cinnamonnoktodir)/assets/menu/submenu.svg
cinnamon_nokto_asset_misc_file = \
	$(cinnamonnoktodir)/assets/misc/add-workspace-active.svg \
	$(cinnamonnoktodir)/assets/misc/add-workspace-hover.svg \
	$(cinnamonnoktodir)/assets/misc/add-workspace.svg \
	$(cinnamonnoktodir)/assets/misc/bg.svg \
	$(cinnamonnoktodir)/assets/misc/button-box.svg \
	$(cinnamonnoktodir)/assets/misc/calendar-arrow-left.svg \
	$(cinnamonnoktodir)/assets/misc/calendar-arrow-right.svg \
	$(cinnamonnoktodir)/assets/misc/close-active.svg \
	$(cinnamonnoktodir)/assets/misc/close-hover.svg \
	$(cinnamonnoktodir)/assets/misc/close.svg \
	$(cinnamonnoktodir)/assets/misc/corner-ripple.svg \
	$(cinnamonnoktodir)/assets/misc/desklet-header.svg \
	$(cinnamonnoktodir)/assets/misc/desklet.svg \
	$(cinnamonnoktodir)/assets/misc/message.svg \
	$(cinnamonnoktodir)/assets/misc/osd.svg \
	$(cinnamonnoktodir)/assets/misc/overview-hover.svg \
	$(cinnamonnoktodir)/assets/misc/overview.svg \
	$(cinnamonnoktodir)/assets/misc/trash-icon.svg
cinnamon_nokto_asset_panel_file = \
	$(cinnamonnoktodir)/assets/panel/activities-active.svg \
	$(cinnamonnoktodir)/assets/panel/activities.svg
cinnamon_nokto_asset_switch_file = \
	$(cinnamonnoktodir)/assets/switch/switch-off.svg \
	$(cinnamonnoktodir)/assets/switch/switch-on.svg
cinnamon_nokto_asset_thumb_file = \
	$(cinnamonnoktodir)/assets/thumbnail.png

xfcedir         = $(srcdir)/xfce-notify-4.0
xfce_image_file = \
	$(xfcedir)/flat-button-active.svg \
	$(xfcedir)/flat-button-hover.svg \
	$(xfcedir)/flat-button-insensitive.svg \
	$(xfcedir)/flat-button.svg
xfce_rc_file = \
	$(xfcedir)/gtkrc

sassc_option = -M -t compact

# ****************************
# * Generate CSS stylesheets *
# ****************************

all:
if ENABLE_GNOME
	$(MKDIR_P) $(srcdir)/gnome-shell/assets
	$(MKDIR_P) $(srcdir)/gnome-shell/extensions/workspaces-to-dock/assets
	$(MKDIR_P) $(srcdir)/gnome-shell-nokto/assets
	$(MKDIR_P) $(srcdir)/gnome-shell-eta/assets
	$(MKDIR_P) $(srcdir)/gnome-shell-eta/extensions/workspaces-to-dock/assets
	$(MKDIR_P) $(srcdir)/gnome-shell-nokto-eta/assets

	cd $(srcdir)/sass && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/gnome-shell.scss ../gnome-shell/gnome-shell.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/gnome-shell-dark.scss ../gnome-shell-nokto/gnome-shell.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/gnome-shell-eta.scss ../gnome-shell-eta/gnome-shell.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/gnome-shell-dark-eta.scss ../gnome-shell-nokto-eta/gnome-shell.css
if GNOME_IS_326_OR_NEWER
	cd $(srcdir)/sass && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/gdm3.scss ../gnome-shell/gdm3-Adapta.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/gdm3-dark.scss ../gnome-shell-nokto/gdm3-Adapta-Nokto.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/gdm3-eta.scss ../gnome-shell-eta/gdm3-Adapta-Eta.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/gdm3-dark-eta.scss ../gnome-shell-nokto-eta/gdm3-Adapta-Nokto-Eta.css
endif
	cd $(srcdir)/sass && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/pad-osd.scss ../gnome-shell/pad-osd.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/pad-osd.scss ../gnome-shell-nokto/pad-osd.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/pad-osd.scss ../gnome-shell-eta/pad-osd.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/pad-osd.scss ../gnome-shell-nokto-eta/pad-osd.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/stylesheet.scss ../gnome-shell/extensions/window-list/stylesheet.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/classic.scss ../gnome-shell/extensions/window-list/classic.css && \
		$(SASSC) $(sassc_option) \
		gnome-shell/$(GNOME_SCSS_VERSION)/workspaces-to-dock.scss ../gnome-shell/extensions/workspaces-to-dock/workspaces-to-dock.css

	cd $(srcdir)/asset && ./clone-assets-gnome-shell.sh

	$(GLIB_COMPILE_RESOURCES) --sourcedir=$(shelldir) \
		$(shelldir)/gnome-shell-theme.gresource.xml
	$(GLIB_COMPILE_RESOURCES) --sourcedir=$(shellnoktodir) \
		$(shellnoktodir)/gnome-shell-theme.gresource.xml
	$(GLIB_COMPILE_RESOURCES) --sourcedir=$(shelletadir) \
		$(shelletadir)/gnome-shell-theme.gresource.xml
	$(GLIB_COMPILE_RESOURCES) --sourcedir=$(shellnoktoetadir) \
		$(shellnoktoetadir)/gnome-shell-theme.gresource.xml
endif

if ENABLE_CINNAMON
	$(MKDIR_P) $(srcdir)/cinnamon
	$(MKDIR_P) $(srcdir)/cinnamon-nokto

	cd $(srcdir)/sass && \
		$(SASSC) $(sassc_option) cinnamon/cinnamon.scss ../cinnamon/cinnamon.css && \
		$(SASSC) $(sassc_option) cinnamon/cinnamon-dark.scss ../cinnamon-nokto/cinnamon.css

	$(MKDIR_P) $(srcdir)/cinnamon/assets
	$(MKDIR_P) $(srcdir)/cinnamon/assets/checkbox
	$(MKDIR_P) $(srcdir)/cinnamon/assets/menu
	$(MKDIR_P) $(srcdir)/cinnamon/assets/misc
	$(MKDIR_P) $(srcdir)/cinnamon/assets/panel
	$(MKDIR_P) $(srcdir)/cinnamon/assets/switch
	$(MKDIR_P) $(srcdir)/cinnamon-nokto/assets
	$(MKDIR_P) $(srcdir)/cinnamon-nokto/assets/checkbox
	$(MKDIR_P) $(srcdir)/cinnamon-nokto/assets/menu
	$(MKDIR_P) $(srcdir)/cinnamon-nokto/assets/misc
	$(MKDIR_P) $(srcdir)/cinnamon-nokto/assets/panel
	$(MKDIR_P) $(srcdir)/cinnamon-nokto/assets/switch
	cd $(srcdir)/asset && \
		./clone-assets-cinnamon.sh && \
		./render-assets-cinnamon-thumb.sh
endif

if ENABLE_XFCE
	cd $(srcdir)/asset && ./clone-assets-xfce.sh
endif

# *****************
# * Install files *
# *****************

install-data-local:
if ENABLE_GNOME
	$(MKDIR_P) $(adaptadir)/gnome-shell
	$(MKDIR_P) $(adaptadir)/gnome-shell/assets
	$(MKDIR_P) $(adaptadir)/gnome-shell/extensions
	$(MKDIR_P) $(adaptadir)/gnome-shell/extensions/window-list
	$(MKDIR_P) $(adaptadir)/gnome-shell/extensions/workspaces-to-dock
	$(MKDIR_P) $(adaptadir)/gnome-shell/extensions/workspaces-to-dock/assets
	cp -Rv $(shell_file) $(adaptadir)/gnome-shell
	cp -Rv $(shell_pad_osd_file) $(adaptadir)/gnome-shell
	cp -Rv $(shell_asset_file) $(adaptadir)/gnome-shell/assets
	cp -Rv $(shell_extension_windowlist_file) \
		$(adaptadir)/gnome-shell/extensions/window-list
	cp -Rv $(shell_extension_workspace_file) \
		$(adaptadir)/gnome-shell/extensions/workspaces-to-dock
	cp -Rv $(shell_extension_workspace_asset_file) \
		$(adaptadir)/gnome-shell/extensions/workspaces-to-dock/assets
if GNOME_IS_326_OR_NEWER
	cp -Rv $(shell_gdm3_file) $(adaptadir)/gnome-shell
endif

	$(MKDIR_P) $(noktodir)/gnome-shell
	$(MKDIR_P) $(noktodir)/gnome-shell/assets
	$(MKDIR_P) $(noktodir)/gnome-shell/extensions
	$(MKDIR_P) $(noktodir)/gnome-shell/extensions/window-list
	$(MKDIR_P) $(noktodir)/gnome-shell/extensions/workspaces-to-dock
	$(MKDIR_P) $(noktodir)/gnome-shell/extensions/workspaces-to-dock/assets
	cp -Rv $(shell_nokto_file) $(noktodir)/gnome-shell
	cp -Rv $(shell_pad_osd_file) $(noktodir)/gnome-shell
	cp -Rv $(shell_nokto_asset_file) $(noktodir)/gnome-shell/assets
	cp -Rv $(shell_extension_windowlist_file) \
		$(noktodir)/gnome-shell/extensions/window-list
	cp -Rv $(shell_extension_workspace_file) \
		$(noktodir)/gnome-shell/extensions/workspaces-to-dock
	cp -Rv $(shell_extension_workspace_asset_file) \
		$(noktodir)/gnome-shell/extensions/workspaces-to-dock/assets
if GNOME_IS_326_OR_NEWER
	cp -Rv $(shell_nokto_gdm3_file) $(noktodir)/gnome-shell
endif

	$(MKDIR_P) $(adaptaetadir)/gnome-shell
	$(MKDIR_P) $(adaptaetadir)/gnome-shell/assets
	$(MKDIR_P) $(adaptaetadir)/gnome-shell/extensions
	$(MKDIR_P) $(adaptaetadir)/gnome-shell/extensions/window-list
	$(MKDIR_P) $(adaptaetadir)/gnome-shell/extensions/workspaces-to-dock
	$(MKDIR_P) $(adaptaetadir)/gnome-shell/extensions/workspaces-to-dock/assets
	cp -Rv $(shelleta_file) $(adaptaetadir)/gnome-shell
	cp -Rv $(shell_pad_osd_file) $(adaptaetadir)/gnome-shell
	cp -Rv $(shelleta_asset_file) $(adaptaetadir)/gnome-shell/assets
	cp -Rv $(shell_extension_windowlist_file) \
		$(adaptaetadir)/gnome-shell/extensions/window-list
	cp -Rv $(shell_extension_workspace_file) \
		$(adaptaetadir)/gnome-shell/extensions/workspaces-to-dock
	cp -Rv $(shell_extension_workspace_asset_file) \
		$(adaptaetadir)/gnome-shell/extensions/workspaces-to-dock/assets
if GNOME_IS_326_OR_NEWER
	cp -Rv $(shell_eta_gdm3_file) $(adaptaetadir)/gnome-shell
endif

	$(MKDIR_P) $(noktoetadir)/gnome-shell
	$(MKDIR_P) $(noktoetadir)/gnome-shell/assets
	$(MKDIR_P) $(noktoetadir)/gnome-shell/extensions
	$(MKDIR_P) $(noktoetadir)/gnome-shell/extensions/window-list
	$(MKDIR_P) $(noktoetadir)/gnome-shell/extensions/workspaces-to-dock
	$(MKDIR_P) $(noktoetadir)/gnome-shell/extensions/workspaces-to-dock/assets
	cp -Rv $(shell_nokto_eta_file) $(noktoetadir)/gnome-shell
	cp -Rv $(shell_pad_osd_file) $(noktoetadir)/gnome-shell
	cp -Rv $(shell_nokto_eta_asset_file) $(noktoetadir)/gnome-shell/assets
	cp -Rv $(shell_extension_windowlist_file) \
		$(noktoetadir)/gnome-shell/extensions/window-list
	cp -Rv $(shell_extension_workspace_file) \
		$(noktoetadir)/gnome-shell/extensions/workspaces-to-dock
	cp -Rv $(shell_extension_workspace_asset_file) \
		$(noktoetadir)/gnome-shell/extensions/workspaces-to-dock/assets
if GNOME_IS_326_OR_NEWER
	cp -Rv $(shell_nokto_eta_gdm3_file) $(noktoetadir)/gnome-shell
endif
endif

if ENABLE_CINNAMON
	$(MKDIR_P) $(adaptadir)/cinnamon
	$(MKDIR_P) $(adaptadir)/cinnamon/assets
	$(MKDIR_P) $(adaptadir)/cinnamon/assets/checkbox
	$(MKDIR_P) $(adaptadir)/cinnamon/assets/menu
	$(MKDIR_P) $(adaptadir)/cinnamon/assets/misc
	$(MKDIR_P) $(adaptadir)/cinnamon/assets/panel
	$(MKDIR_P) $(adaptadir)/cinnamon/assets/switch
	cp -Rv $(cinnamon_file) $(adaptadir)/cinnamon
	cp -Rv $(cinnamon_asset_checkbox_file) \
		$(adaptadir)/cinnamon/assets/checkbox
	cp -Rv $(cinnamon_asset_menu_file) \
		$(adaptadir)/cinnamon/assets/menu
	cp -Rv $(cinnamon_asset_misc_file) \
		$(adaptadir)/cinnamon/assets/misc
	cp -Rv $(cinnamon_asset_panel_file) \
		$(adaptadir)/cinnamon/assets/panel
	cp -Rv $(cinnamon_asset_switch_file) \
		$(adaptadir)/cinnamon/assets/switch
	cp -Rv $(cinnamon_asset_thumb_file) \
		$(adaptadir)/cinnamon/assets
	cd $(adaptadir)/cinnamon && \
		ln -sf ./assets/thumbnail.png thumbnail.png

	$(MKDIR_P) $(noktodir)/cinnamon
	$(MKDIR_P) $(noktodir)/cinnamon/assets
	$(MKDIR_P) $(noktodir)/cinnamon/assets/checkbox
	$(MKDIR_P) $(noktodir)/cinnamon/assets/menu
	$(MKDIR_P) $(noktodir)/cinnamon/assets/misc
	$(MKDIR_P) $(noktodir)/cinnamon/assets/panel
	$(MKDIR_P) $(noktodir)/cinnamon/assets/switch
	cp -Rv $(cinnamon_nokto_file) $(noktodir)/cinnamon
	cp -Rv $(cinnamon_nokto_asset_checkbox_file) \
		$(noktodir)/cinnamon/assets/checkbox
	cp -Rv $(cinnamon_nokto_asset_menu_file) \
		$(noktodir)/cinnamon/assets/menu
	cp -Rv $(cinnamon_nokto_asset_misc_file) \
		$(noktodir)/cinnamon/assets/misc
	cp -Rv $(cinnamon_nokto_asset_panel_file) \
		$(noktodir)/cinnamon/assets/panel
	cp -Rv $(cinnamon_nokto_asset_switch_file) \
		$(noktodir)/cinnamon/assets/switch
	cp -Rv $(cinnamon_nokto_asset_thumb_file) \
		$(noktodir)/cinnamon/assets
	cd $(noktodir)/cinnamon && \
		ln -sf ./assets/thumbnail.png thumbnail.png
endif

if ENABLE_XFCE
	$(MKDIR_P) $(adaptadir)/xfce-notify-4.0
	cp -Rv $(xfce_image_file) $(adaptadir)/xfce-notify-4.0
	cp -Rv $(xfce_rc_file) $(adaptadir)/xfce-notify-4.0
endif

# *******************
# * Uninstall files *
# *******************

uninstall-local:
if ENABLE_GNOME
	test -e $(noktodir)/gnome-shell && rm -rfv $(noktodir)/gnome-shell
	test -e $(adaptadir)/gnome-shell && rm -rfv $(adaptadir)/gnome-shell
	test -e $(noktoetadir)/gnome-shell && rm -rfv $(noktoetadir)/gnome-shell
	test -e $(adaptaetadir)/gnome-shell && rm -rfv $(adaptaetadir)/gnome-shell
endif

if ENABLE_CINNAMON
	test -e $(noktodir)/cinnamon && rm -rfv $(noktodir)/cinnamon
	test -e $(adaptadir)/cinnamon && rm -rfv $(adaptadir)/cinnamon
endif

if ENABLE_XFCE
	test -e $(adaptadir)/xfce-notify-4.0 && \
		rm -rfv $(adaptadir)/xfce-notify-4.0
endif

# ****************************
# * Clean up generated files *
# ****************************

CLEANFILES =
if ENABLE_GNOME
CLEANFILES += \
	$(srcdir)/gnome-shell/gnome-shell.css \
	$(srcdir)/gnome-shell-nokto/gnome-shell.css \
	$(srcdir)/gnome-shell-eta/gnome-shell.css \
	$(srcdir)/gnome-shell-nokto-eta/gnome-shell.css \
	$(srcdir)/gnome-shell/pad-osd.css \
	$(srcdir)/gnome-shell-nokto/pad-osd.css \
	$(srcdir)/gnome-shell-eta/pad-osd.css \
	$(srcdir)/gnome-shell-nokto-eta/pad-osd.css \
	$(srcdir)/gnome-shell/extensions/window-list/stylesheet.css \
	$(srcdir)/gnome-shell/extensions/window-list/classic.css \
	$(srcdir)/gnome-shell/extensions/workspaces-to-dock/workspaces-to-dock.css \
	$(srcdir)/gnome-shell/gnome-shell-theme.gresource \
	$(srcdir)/gnome-shell-nokto/gnome-shell-theme.gresource \
	$(srcdir)/gnome-shell-eta/gnome-shell-theme.gresource \
	$(srcdir)/gnome-shell-nokto-eta/gnome-shell-theme.gresource \
	$(srcdir)/gnome-shell/*.svg \
	$(srcdir)/gnome-shell/*.png \
	$(srcdir)/gnome-shell/assets/*.svg \
	$(srcdir)/gnome-shell/extensions/workspaces-to-dock/assets/*.svg \
	$(srcdir)/gnome-shell-eta/extensions/workspaces-to-dock/assets/*.svg \
	$(srcdir)/gnome-shell-eta/*.svg \
	$(srcdir)/gnome-shell-eta/*.png \
	$(srcdir)/gnome-shell-eta/assets/*.svg \
	$(srcdir)/gnome-shell-nokto/*.svg \
	$(srcdir)/gnome-shell-nokto/*.png \
	$(srcdir)/gnome-shell-nokto/assets/*.svg \
	$(srcdir)/gnome-shell-nokto-eta/*.svg \
	$(srcdir)/gnome-shell-nokto-eta/*.png \
	$(srcdir)/gnome-shell-nokto-eta/assets/*.svg \
	$(srcdir)/asset/assets-gnome-shell/common/checkbox-hover.svg \
	$(srcdir)/asset/assets-gnome-shell/common/checkbox.svg \
	$(srcdir)/asset/assets-gnome-shell/common/corner-ripple-ltr.svg \
	$(srcdir)/asset/assets-gnome-shell/common/corner-ripple-rtl.svg \
	$(srcdir)/asset/assets-gnome-shell/common/dash-placeholder.svg \
	$(srcdir)/asset/assets-gnome-shell/common/go-down.svg \
	$(srcdir)/asset/assets-gnome-shell/common/go-up.svg \
	$(srcdir)/asset/assets-gnome-shell/common/key-shift-latched-uppercase.svg \
	$(srcdir)/asset/assets-gnome-shell/common/key-shift-uppercase.svg \
	$(srcdir)/asset/assets-gnome-shell/common/media-control-active.svg \
	$(srcdir)/asset/assets-gnome-shell/common/media-control-hover.svg \
	$(srcdir)/asset/assets-gnome-shell/common/more-results.svg \
	$(srcdir)/asset/assets-gnome-shell/common/process-working.svg \
	$(srcdir)/asset/assets-gnome-shell/common/toggle-on.svg \
	$(srcdir)/asset/assets-gnome-shell/common/window-close.svg \
	$(srcdir)/asset/assets-gnome-shell/common/window-close-active.svg \
	$(srcdir)/asset/assets-gnome-shell/common/window-close-hover.svg \
	$(srcdir)/asset/assets-gnome-shell/workspaces-to-dock/*.svg
if GNOME_IS_326_OR_NEWER
CLEANFILES += \
	$(srcdir)/gnome-shell/gdm3-Adapta.css \
	$(srcdir)/gnome-shell-nokto/gdm3-Adapta-Nokto.css \
	$(srcdir)/gnome-shell-eta/gdm3-Adapta-Eta.css \
	$(srcdir)/gnome-shell-nokto-eta/gdm3-Adapta-Nokto-Eta.css
endif
endif

if ENABLE_CINNAMON
CLEANFILES += \
	$(srcdir)/cinnamon/cinnamon.css \
	$(srcdir)/cinnamon-nokto/cinnamon.css \
	$(srcdir)/cinnamon/assets/thumbnail.png \
	$(srcdir)/cinnamon-nokto/assets/thumbnail.png \
	$(srcdir)/cinnamon/assets/*/*.svg \
	$(srcdir)/cinnamon-nokto/assets/*/*.svg \
	$(srcdir)/asset/assets-cinnamon/common/checkbox/*.svg \
	$(srcdir)/asset/assets-cinnamon/common/misc/add-workspace-active.svg \
	$(srcdir)/asset/assets-cinnamon/common/misc/close.svg \
	$(srcdir)/asset/assets-cinnamon/common/misc/close-active.svg \
	$(srcdir)/asset/assets-cinnamon/common/misc/close-hover.svg \
	$(srcdir)/asset/assets-cinnamon/common/misc/corner-ripple.svg \
	$(srcdir)/asset/assets-cinnamon/common/misc/message.svg \
	$(srcdir)/asset/assets-cinnamon/common/panel/activities-active.svg \
	$(srcdir)/asset/assets-cinnamon/common/panel/window-list-active-bottom.svg \
	$(srcdir)/asset/assets-cinnamon/common/panel/window-list-active-top.svg \
	$(srcdir)/asset/assets-cinnamon/common/switch/switch-on.svg \
	$(srcdir)/asset/assets-cinnamon/light/misc/thumbnail.svg \
	$(srcdir)/asset/assets-cinnamon/nokto/misc/thumbnail.svg \
	$(srcdir)/asset/inkscape.log
endif
if ENABLE_XFCE
CLEANFILES += \
	$(srcdir)/xfce-notify-4.0/*.svg \
	$(srcdir)/asset/assets-xfce/flat-button-active.svg \
	$(srcdir)/asset/assets-xfce/flat-button-hover.svg
endif

DISTCLEANFILES = \
	$(CLEANFILES)
